//
//  RBHomeHotRankCell.m
//  zhongzhenglu
//
//  Created by XL on 2022/5/26.
//

#import "RBHomeHotRankCell.h"
#import <YYCategories.h>
#import "RanTool.h"
#import "UIView+RBAdd.h"
#import "RBHomeHotResponse.h"
#import "UIImageView+RBAdd.h"

@interface RBHomeHotRankCell()

@property(nonatomic, strong)IBOutlet UIImageView *imgView;
@property(nonatomic, strong)IBOutlet UILabel *titleL;
@property(nonatomic, strong)IBOutlet UILabel *desL;
@property(nonatomic, strong)IBOutlet UILabel *priceL;

@end

@implementation RBHomeHotRankCell

- (void)awakeFromNib
{
    [super awakeFromNib];
    [self zoomSubViewsWithSelf];
}

- (void)setCellModel:(RBCellModel *)cellModel
{
    RBHomeHotModel *model = cellModel.cellData;
    [self.imgView setImageWithUrl:model.picurl placeHolder:nil];
    self.titleL.text = model.good_name;
    self.desL.text = model.remark;
    self.priceL.attributedText = [RanTool attributeStringMaker:^(NSMutableArray *maker) {
        [maker addAttributeStringWithFont:[UIFont boldSystemFontOfSize:Zoom(11)] color:[UIColor colorWithHexString:@"#F04D27"] string:@"￥"];
        [maker addAttributeStringWithFont:[UIFont boldSystemFontOfSize:Zoom(15)] color:[UIColor colorWithHexString:@"#F04D27"] string:model.sell_price];
    }];
}

@end
